home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / wndw40.zip / WNDW40.DOC < prev    next >
Text File  |  1987-12-11  |  14KB  |  296 lines

  1.                                                          December 12, 1987 
  2.  
  3.                                    MULTI-LEVEL 
  4.                                   RANDOM-ACCESS
  5.                                      WINDOWS
  6.                                    Version 4.0
  7.  
  8.         PURPOSE:
  9.  
  10.         Two units create incredibly quick multi-level, random-access 
  11.         windows in Turbo Pascal 4.0 programs for all IBM and compatibles 
  12.         including the new PS/2 systems, PCjr, PC convertible, and 3270 PC.  
  13.         They work in all text modes and any column mode (40/80/etc.) using 
  14.         the quick screen writing utilities of QWIK40.TPU.  The entire code 
  15.         is only 7.4k bytes for all utilities.
  16.  
  17.  
  18.         TEST DRIVE:
  19.  
  20.         Compile and run the tutoring program WNDWDEMO.PAS to get a feeling
  21.         for features and speed.  For a demo of window management with 
  22.         random-access windows, run WMGRDEMO.PAS.  Both demos use the same 
  23.         code, but were just applied differently. 
  24.  
  25.  
  26.         FILES:
  27.  
  28.         In this version, WNDW40.ARC contains:
  29.  
  30.            !_read  .me!:  File that insists you get a copy of QWIK40.ARC.
  31.            Qwik40a .tpu:  Unit for quick screen writing.
  32.            WndwVars.pas:  Unit source code for variables used in 
  33.                           WNDW40.TPU.
  34.            WndwVars.tpu:  Unit of WNDWVARS.PAS.
  35.            Wndw40  .tpu:  Unit for your programs to use windows.
  36.            Wndw40- .pas:  Partial source code listing of WNDW40.TPU.
  37.            Wndw40  .doc:  This document.
  38.            WndwDemo.pas:  Demo of WNDW40.TPU and QWIK40.TPU which also
  39.                           gives a tutorial of user instructions.
  40.            WmgrDemo.pas:  Demo of window management with random-access.
  41.            License .arc:  ARC file containing license agreements
  42.  
  43.  
  44.         IMPROVEMENTS:
  45.  
  46.         Obviously, this program was modified to work with TP 4.0.  In 
  47.         addition, several new features were added for random-access 
  48.         windows.  Compared to WINDOW34.INC, the code has been overhauled 
  49.         and many improvements in code optimization were made as noted 
  50.         below and in the demos.  However, the changes necessary to upgrade 
  51.         your code are minimal.
  52.  
  53.  
  54.         PROCEDURES:
  55.  
  56.         WNDW40.TPU - This unit has the full capabilities of window 
  57.         management of random-access windows.  Note that WNDW40.TPU uses 
  58.         QWIK.TPU and WNDWVARS.TPU.  MaxWndw is fixed at 30 windows and the 
  59.         window names have all been assigned.  In order to make any 
  60.         changes, the complete source code will be required to still have 
  61.         the full window management utilities.
  62.  
  63.         WNDW40-.PAS - The procedures in WNDW40.TPU are only partially 
  64.         listed in WNDW40-.PAS.  I have decided not to disclose some of the 
  65.         more critical procedures in window management in this ARC file.  
  66.         This means that you can make some changes in WNDWVARS.PAS, but 
  67.         only the BASIC (serial-access) window utilities will be compiled 
  68.         in WNDW40-.PAS.  The length of the complete source code is over 
  69.         1000 lines.  Of course, those registered can receive the source 
  70.         code upon request.
  71.  
  72.  
  73.         SHAREWARE:
  74.  
  75.         These procedures are ShareWare. The cost may range from $6 to $32 
  76.         depending on your application.  I do enjoy assisting others in 
  77.         their programming, but lack of reimbursement is expensive for me! 
  78.         Please help out.  See the STATMENT.LIC in LICENSE.ARC for details.  
  79.         If the response will let me break even, I will continue support.
  80.  
  81.  
  82.         UPGRADING:
  83.  
  84.         QWIK - Refer to the notes in QWIK40.ARC for upgrading the QWIK 
  85.         utilities.
  86.  
  87.         Modes - All the modes are kept as bit flags in the global variable 
  88.         called WindowModes.  ShadowDir and FixedWindow have been 
  89.         converted into one of the modes listed below.  Contrary to what 
  90.         you might expect, FixedWindow corresponds to the constant PermMode 
  91.         and not FixedMode.  None of the modes are tripped back to clear 
  92.         and remain unaltered until you change them.  Each window saves a 
  93.         copy of WindowModes when it was created in the variable WSmodes.  
  94.         The constants listed below have the appropriate bit flag set.
  95.  
  96.           PermMode    - This window will saves the underlay and is 
  97.                         permanent.  So, it can't be moved, hidden, or 
  98.                         accessed.  Use this for the first windows 
  99.                         placed on the screen.
  100.           FixedMode   - the underlay is saved in this mode, but it  
  101.                         prevents the user from moving or accessing 
  102.                         it randomly, such as pull-down menus.
  103.           ShadowLeft  - a shadow is placed on the lower left corner.
  104.           ShadowRight - a shadow is placed on the upper right corner.
  105.           ZoomMode    - this creates the zoom effect when the window 
  106.                         is made, accessed or shown.
  107.           HideMode    - This is handled by WNDW40.  It will tell you 
  108.                         the status of the window.  It shouldn't be 
  109.                         set by the programmer.  Another way to tell 
  110.                         if a window is hidden is with GetLevelIndex.  
  111.                         If the value is greater than LI, it's hidden.
  112.  
  113.         To set the modes for subsequent MakeWindows, use the following:
  114.           
  115.             SetWindowModes (ZoomMode+ShadowRight);
  116.  
  117.         You could just as easily assign WindowModes manually:
  118.  
  119.             WindowModes:=ZoomMode+ShadowRight;
  120.  
  121.         SetWindowModes just makes sure you don't have two shadows turned 
  122.         on and clears the HideMode.  The default is all modes off.  
  123.         WindowModes will apply to all subsequent MakeWindows.
  124.  
  125.         MakeWindow - This procedure now requires a unique name so it can 
  126.         be identified for random-access.  If you don't intend to use 
  127.         random-access, any name will do.
  128.  
  129.         TitleWindow - One more parameter was added to work on the top or 
  130.         the bottom border.  Simply include the constant Top or Bottom.
  131.  
  132.         Programming Errors - Programming errors now appear as a centered 
  133.         flashing window rather than using a writeln statement.  The code 
  134.         is in WNDWVARS.PAS and you can easily modify it or eliminate it 
  135.         altogether.  Writeln is no longer used anywhere in the units.
  136.  
  137.         WndwStat - Several new variables were added in the WndwStat record 
  138.         for ease of use.  The UnderLay is the screen data that is 
  139.         overwritten by the new window.  With a shadow, it adds 2 more 
  140.         columns and one more row.  These dimensions are kept as "UL" 
  141.         variables.
  142.  
  143.         TopWndwStat - The current window stats are always maintained in 
  144.         the global record TopWndwStat.  Combined with a with statement, 
  145.         the code is optimized just like simple global variables.  So use 
  146.         TopWndwStat in lieu of WndwStat[LI].
  147.  
  148.         Tattr - Change all references to Tattr to TextAttr which is 
  149.         Turbo's text attribute for Writeln.
  150.  
  151.         Suppressing Attributes - The use of a negative number to suppress 
  152.         attribute changes in the creation of a window is now possible.  I, 
  153.         personally,  cannot think of a reasonable application of this per 
  154.         se.  However, if you chose to do so, remember that TextAttr will 
  155.         be set to the lo byte portion of the integer Wattr.  To have both 
  156.         a selected TextAttr and a negative number, give the Wattr 
  157.         parameter the following value:
  158.  
  159.            $FF00 + MyForeground + MyBackground  
  160.         
  161.         Turbo will compile it down to an integer.
  162.  
  163.  
  164.         ADDITIONAL NOTES:
  165.  
  166.         QWIK40A.TPU - If you have QWIK40.ARC, replace your QWIK40.TPU with 
  167.         QWIK40A.TPU.  The earlier version always left SubmodelID as zero.  
  168.         It is corrected in this version.
  169.  
  170.         QWIK - The demos WNDWDEMO.PAS and WMGRDEMO.PAS cover most of the 
  171.         instructions for use, but users sho